import {LOADDATA} from "../constant"

const initState = {
    list: []
}

export default function loadReducer(preState = initState.list, action) {
    const { type, data } = action
    switch (type) {
        case LOADDATA:
            return [...data, ...preState]
    
        default:
            return preState
    }
}